package com.haiyangwang1.lesson8.ex1;

public class BankDemo {
    public static void main(String[] args) {
        Account account = new Account();
        account.desposit(100);
        try {
            account.withdraw(600);
        } catch (BankException e) {
            //throw new RuntimeException(e);//e.printStackTrace()
            System.out.println(e.getMsg()+"你的账号上还差"+e.getAmount());
        }
    }
}
